<div class="row u-hide u-no-padding" data-flow-details="java">
  <div class="col-6">
    <h4>Why are snaps good for Java projects?</h4>
    <ul>
      <li>Simplify installation instructions, regardless of distribution, to snap install myjavaapp.</li>
      <li>Directly control the delivery of automatic application updates.</li>
    </ul>
    <p>Distributing a Java application for Linux and reaching the widest possible audience is complicated. Typically, the user has to make sure the JRE/SDK version and their environment are configured correctly. When a Linux distribution changes the delivered JRE, this can be problematic for applications. Snapcraft ensures the correct JRE is shipped alongside the application at all times.</p>

    <div class="p-flow-details__continue">
      <p>In just a few steps, you’ll have an example Java app in the Snap Store.</p>
      <a class="p-button--positive" href="/first-snap/java">Continue &rsaquo;</a>
    </div>
  </div>

  <div class="col-6">
    <h4>Here's how <a href="https://snapcraft.io/freeplane-mindmapping">freeplane</a> defines snapcraft.yaml:</h4>
    <div class ="p-show-more is-collapsed" data-js="js-show-more">
      <pre class="p-code-yaml"><b>name</b>: freeplane
<b>version</b>: '1.6.10'
<b>summary</b>: Application for Mind Mapping [&hellip;]
<b>description</b>: |
  Freeplane is a free and open source software [&hellip;]

<b>confinement</b>: devmode

<b>parts:</b>
  <b>freeplane:</b>
    <b>after:</b> [desktop-glib-only]
    <b>plugin:</b> gradle
    <b>source:</b> .
    <b>build:</b> |
      export JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64"
      gradle release -x test -x createGitTag
    <b>install:</b> |
      unzip DIST/freeplane_bin-*.zip -d $SNAPCRAFT_PART_INSTALL/
    <b>build-packages:</b>
      - unzip
      - openjdk-8-jdk

<b>apps</b>:
  <b>freeplane</b>:
    <b>command</b>: desktop-launch $SNAP/freeplane-1.6.10/freeplane.sh</pre>

      {% include "home/_fsf_yaml_show_more.html" %}

    </div>
  </div>
</div>
